package com.wc.blue_bridge_test.base.T65;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/12/28 0:15
 * @description 龟兔赛跑预测
 * https://lx.lanqiao.cn/problem.page?gpid=T65
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int v1 = sc.nextInt();
        int v2 = sc.nextInt();
        int t = sc.nextInt();
        int s = sc.nextInt();
        int l = sc.nextInt();
        int time = 0;
        int r = 0;
        int tt = 0;
        int wait = 0;
        // 是否为跑的状态
        boolean flg = true;
        do {
            time++;
            if (wait == 0) {
                flg = true;
                r += v1;
            } else {
                wait--;
            }
            tt += v2;

            // 不可能一直在等待为
            if (r - tt >= t && flg) {
                wait = s;
                flg = false;
            }
        } while (r != l && tt != l);
        if (r == l && tt == l) {
            System.out.println("D");
        } else if (r == l) {
            System.out.println("R");
        } else {
            System.out.println("T");
        }
        System.out.println(time);
    }
}
